import { Component } from '@angular/core';
import {IonicPage, NavController, NavParams, Platform, ViewController} from 'ionic-angular';
import {AppConfig} from "../../app/app.config";

/**
 * Generated class for the ModifyTextPage page.
 *
 * See https://ionicframework.com/docs/components/#navigation for more info on
 * Ionic pages and navigation.
 */

@IonicPage()
@Component({
  selector: 'page-modify-text',
  templateUrl: 'modify-text.html',
})
export class ModifyTextPage {

  textData:any;
  text:any;

  constructor(public navCtrl: NavController,
              public navParams: NavParams,
              public viewCtrl:ViewController,
              public platform:Platform) {
    this.textData = navParams.get('text');

  }

  ionViewDidEnter() {
    // console.log('ionViewDidLoad ModifyTextPage');
    AppConfig.viewCtrl = this.viewCtrl;
  }

  dismiss(){
    this.viewCtrl.dismiss();
  }

  saveDismiss(){
    this.viewCtrl.dismiss(this.text);
  }


}
